.chat-window {
    position: fixed;
    width: 250px;
    bottom: 0;
    margin-top: -50px;
    right: 50px;
    display: none;
    z-index: 11;
    @extend .box-shadow-large;
    @extend .transition;
    .card {
        .card-header {
            .media {
                .media-body {
                    min-width: 60%;
                    h6 {
                        text-overflow: ellipsis;
                        white-space: nowrap;
                        overflow: hidden;
                    }
                }
                .chat-minmax {
                    color: #ffffff;
                    text-decoration: none;
                    
                    i.fullscreenicon {
                        display: block
                    }
                    i.minimizeicon {
                        display: none
                    }
                    &.active {
                        i.minimizeicon {
                            display: block
                        }
                        i.fullscreenicon {
                            display: none
                        }
                    }
                }
                .chat-close{                    
                    color: #ffffff;
                    text-decoration: none;
                    margin-top: -2px;
                }
            }
        }
        .card-body {
            padding: 0px;
            max-height: 250px;
            overflow-y: auto;
            background: $background-color;
            height: 0;
            min-height: auto;
             @extend .transition;
        }
        .card-footer {
                padding: 0;
                @extend .transition;
                height: 0;
                min-height: none
            }
    }
    &.active {
        .card {
            .card-body {
                padding: 15px;
                min-height: 100px;      
                height: auto
            }
            .card-footer {
                padding:15px;
                height: auto;   
            }
        }
    }
}
.chatlist {
    border: 0;
    li {
        border: none;
        padding: 10px 0;
        .media {
            padding-left: 10px;
            figure {
                margin: 0;
            }
            .media-body {
                border-radius: 0.5em;
                background: lighten($background-color, 5%);
                padding: 5px 10px;
                font-size: 0.9em;
                line-height: 1.4em;
                position: relative;
                box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.1);
                -moz-box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.1);
                -webkit-box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.1);
                -ms-box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.1);
                &:before {
                    content: "";
                    background: lighten($background-color, 5%);
                    height: 10px;
                    width: 10px;
                    border-radius: 2px;
                    transform: rotate(45deg);
                    -webkit-transform: rotate(45deg);
                    -moz-transform: rotate(45deg);
                    -ms-transform: rotate(45deg);
                    position: absolute;
                    left: -5px;
                    top: 10px;
                }
                &.no-arrow{
                    &:before{
                        display: none;
                    }
                }
            }
        }
        &.chat-you {
            .media {
                padding-right: 10px;
                padding-left: 0px;
                .media-body {
                    background: $blue;
                    color: #ffffff;
                    &:before {
                        background: $blue;
                        left: auto;
                        right: -5px;
                    }
                }
            }
        }
        &.list-divider {
            padding: 0;
            border-bottom: 1px solid darken($content-color-primary, 6%);
            list-style: none;
            margin: 10px 0 5px 0;
            height: auto;
            color: darken($content-color-primary, 2%);
            text-align: center;
            font-size: 0.7em;
        }
    }
    
    &.app{
        li{
            .media{
                .media-body{
                    flex: none;
                    padding: 10px 15px;
                    font-size: 1.1em;
                    line-height: 1.6em;
                    max-width: 85%;                    
                }
            }
            &.chat-you {
                 .media{
               justify-content: flex-end
                }
            }
        }
    }
}
.chatview{ overflow-y: auto; overflow-x: hidden}
.setting-sidebar-open {
    .chat-window {
        right: 350px
    }
}

#chat-list .list-group-item{
    cursor: pointer;
}

@media screen and (max-width:640px){
    .settings-sidebar{
        width: 270px;
        &.close-settings-sidebar-backdrop {
            right: -280px;
        }
    }
    .setting-sidebar-open .chat-window{ right: 15px}
}